function getData(key){
  return JSON.parse(sessionStorage.getItem(key)) 
}
let newDate=getData('kby')

function showMenu(data){
  $('#tbody').html('')
   $.each(data,(index,item)=>{
     $('#tbody').append(`
     <tr>
     <td class="col-md-2 item">${item.xingming}</td> 
     <td class="col-md-2 item">${item.bumen}</td> 
     <td class="col-md-2 item">${item.work}</td> 
     <td class="col-md-2 item">${item.level}</td> 
     <td class="col-md-2 item">
     <button class="glyphicon glyphicon-ok-circle xuanzhong" aria-hidden="true"  data-item='${JSON.stringify(item)}'></button>
     </td> 
     </tr>
     `)
   })
  }
  showMenu(newDate)

  $('#tbody').on("click", ".xuanzhong",function (){
    let obj1 = JSON.parse($(this).attr('data-item'))
    // for(let i=0;i<newDate.length;i++){
    //   if (obj1.xingming==newDate[i].xingming) {

    //   }
    // }
    console.log(obj1);
  })
  
  $('#quxiao').click(function (){
    window.location.href="renyuanxinxi.html"  

  })
  $('#queren').click(function (){
    window.location.href="renyuanxinxi.html"  

  })